﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="VirtualPath.aspx.cs" Inherits="VirtualPath_VirtualPath" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>虚拟路径</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <p>鼠标放到链接上时，注意左下角出现的地址的值：</p>

        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="/1.html">/1.html:相对网站根目录</asp:HyperLink>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/1.html">~/1.html：相对应用根目录</asp:HyperLink>
        <br />
        <br />
        
        <a href="~/1.html">html控件，runat!=server</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="~/1.html">asp控件，runat=server</asp:HyperLink>
        <br />
        <br />

        <asp:HyperLink ID="HyperLink5" runat="server">后台代码控制定向到虚拟路径</asp:HyperLink>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl="~/1.html">前台代码控制定向到虚拟路径</asp:HyperLink>
    </div>
    </form>
</body>
</html>
